/*
 * soft_iic.h
 *
 *  Created on: 2023年12月31日
 *      Author: G
 */

#ifndef APP_INCLUDE_SOFT_IIC_C_
#define APP_INCLUDE_SOFT_IIC_C_

#define SOFT_IIC_SPEED     2

#define SOFT_IIC_RESULT_ERROR       -1
#define SOFT_IIC_RESULT_SUCCESS     0

//模拟IIC初始化
void soft_iic_Init(void);

// 7bit地址多字节写入*****************************************
int8_t I2C_7bit_Mult_Write(uint8_t SlaveAddress, uint8_t *ptChar, uint8_t size);
// 7bit地址多字节读取*****************************************
int8_t I2C_7bit_Mult_Read(uint8_t SlaveAddress, uint8_t *ptChar, uint8_t size);

// 10bit地址多字节写入*****************************************
int8_t I2C_10bit_Mult_Write(uint8_t SlaveAddress, uint8_t REG_Address, uint8_t *ptChar, uint8_t size);
//10bit地址多字节读取*****************************************
int8_t I2C_10bit_Mult_Read(uint8_t SlaveAddress,uint8_t REG_Address,uint8_t * ptChar,uint8_t size);

#endif /* APP_INCLUDE_SOFT_IIC_C_ */
